'use strict';
const db = uniCloud.database()
exports.main = async (event, context) => {
	let {
		skip = 0
	} = event
	// 获取所有文章数据
	// skip 过滤
	let res = await db.collection('article').limit(7).skip(skip).orderBy("createTime", "desc").get()
	// let total = await db.collection('article').count()

	//返回数据给客户端
	return res
};